-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSOE-179: Migrate to .editorconfig from ruleset files #93
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
changed the title
Migrate to .editorconfig from ruleset files
OSOE-179: Migrate to .editorconfig from ruleset files
Oct 10, 2023
…er package since it's a more complex one
BenedekFarkas
requested changes
Oct 13, 2023
Lombiq.Analyzers/Lombiq.Analyzers.VisualStudioExtension.globalconfig
Outdated
Show resolved
Hide resolved
BenedekFarkas
requested changes
Oct 13, 2023
Lombiq.Analyzers.Orchard1/Lombiq.Analyzers.Orchard1.globalconfig
Outdated
Show resolved
Hide resolved
Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
BenedekFarkas
approved these changes
Oct 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #32
OSOE-179
Release notes, to be copied to the GitHub release:
TL;DR upgrade instructions
If you used Lombiq .NET Analyzers in an Orchard Core app without overriding any of its configuration, then you have to change its package reference like this:
Or if you used it as a Git submodule:
If you have any other use case, then read on.
Breaking changes
This release upgrades how analyzer configuration is stored. If you've overridden some analyzer configuration, then you'll need to migrate those.
Previously, editor configuration like charset and tab width was in an .editorconfig file, together with some compatible analyzer rule configuration, and the rest of the analyzer rules were configured in RuleSet files. This release moves analyzer configuration to the currently recommended .globalconfig files, while keeping only editor configuration in the .editorconfig file.
Furthermore, to better aid using
Lombiq.Analyzers
in any .NET project, regardless if it's an Orchard Core app or else, we've split the project into multiple, use case-specific projects/packages.Upgrading from v3.x.x
Select the
Lombiq.Analyzers
package suitable for you in any casePreviously, there was only a single
Lombiq.Analyzers
project/package that contained configuration for general .NET, Orchard Core, Orchard 1 (.NET Framework), and Visual Studio Extension projects. By default, this provided configuration for Orchard Core projects. If you wanted to use it in any other kind of project, you needed to jump through hoops.Now, there are multiple projects/packages, all specific to a given use case. To get the most suitable configuration for your project, you just need to select the most applicable one. Please check out the updated docs to see how to add the one suitable for you.
If you haven't overridden any analyzer configuration and just used the project as is
Nothing else to do.
If you have overridden analyzer configuration
If you have overridden configuration coming from a RuleSet file:
RuleSets are now deprecated and you need to use .globalconfig files for analyzer configuration instead.
<Include>
element that loads the default RuleSet file fromLombiq.Analyzers
so only the overriding rules will be converted.If you have overridden configuration coming from the .editorconfig file:
The .editorconfig file now only stores editor-related configuration, like charset and tab settings. All analyzer configuration, also what was formerly in the .editorconfig file, is now in .globalconfig files. Follow the updated docs to override analyzer configuration from .globalconfig files. Overriding editor-related configuration with .editorconfig files works the same as before.